# -*- coding: utf-8 -*-
from import_export import resources
from .models import Sale, GoodInSale, Purchase, GoodInPurchase, SaleComment, GoodComment, Refund, Expense


class SaleResource(resources.ModelResource):
    class Meta:
        model = Sale
        fields = [field.name for field in Sale._meta.fields]


class GoodInSaleResource(resources.ModelResource):

    class Meta:
        model = GoodInSale
        fields = [field.name for field in GoodInSale._meta.fields]


class PurchaseResource(resources.ModelResource):
    class Meta:
        model = Purchase
        fields = [field.name for field in Purchase._meta.fields]


class GoodInPurchaseResource(resources.ModelResource):
    class Meta:
        model = GoodInPurchase
        fields = [field.name for field in GoodInPurchase._meta.fields]

class SaleCommentResource(resources.ModelResource):
    class Meta:
        model = SaleComment
        fields = [field.name for field in SaleComment._meta.fields]


class GoodCommentResource(resources.ModelResource):
    class Meta:
        model = GoodComment
        fields = [field.name for field in GoodComment._meta.fields]


class RefundResource(resources.ModelResource):
    class Meta:
        model = Refund
        fields = [field.name for field in Refund._meta.fields]


class ExpenseResource(resources.ModelResource):
    class Meta:
        model = Expense
        fields = [field.name for field in Expense._meta.fields]
